3.2.34 \(\int \frac {\sec ^6(c+d x)}{(a+i a \tan (c+d x))^3} \, dx\) [134]

Optimal. Leaf size=58 \[ \frac {4 x}{a^3}+\frac {4 i \log (\cos (c+d x))}{a^3 d}-\frac {3 \tan (c+d x)}{a^3 d}+\frac {i \tan ^2(c+d x)}{2 a^3 d} \]

[Out]

4*x/a^3+4*I*ln(cos(d*x+c))/a^3/d-3*tan(d*x+c)/a^3/d+1/2*I*tan(d*x+c)^2/a^3/d

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 58, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {3568, 45} \begin {gather*} \frac {i \tan ^2(c+d x)}{2 a^3 d}-\frac {3 \tan (c+d x)}{a^3 d}+\frac {4 i \log (\cos (c+d x))}{a^3 d}+\frac {4 x}{a^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^6/(a + I*a*Tan[c + d*x])^3,x]

[Out]

(4*x)/a^3 + ((4*I)*Log[Cos[c + d*x]])/(a^3*d) - (3*Tan[c + d*x])/(a^3*d) + ((I/2)*Tan[c + d*x]^2)/(a^3*d)

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 3568

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(a^(m - 2)*b
*f), Subst[Int[(a - x)^(m/2 - 1)*(a + x)^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x
] && EqQ[a^2 + b^2, 0] && IntegerQ[m/2]

Rubi steps

\begin {align*} \int \frac {\sec ^6(c+d x)}{(a+i a \tan (c+d x))^3} \, dx &=-\frac {i \text {Subst}\left (\int \frac {(a-x)^2}{a+x} \, dx,x,i a \tan (c+d x)\right )}{a^5 d}\\ &=-\frac {i \text {Subst}\left (\int \left (-3 a+x+\frac {4 a^2}{a+x}\right ) \, dx,x,i a \tan (c+d x)\right )}{a^5 d}\\ &=\frac {4 x}{a^3}+\frac {4 i \log (\cos (c+d x))}{a^3 d}-\frac {3 \tan (c+d x)}{a^3 d}+\frac {i \tan ^2(c+d x)}{2 a^3 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.53, size = 113, normalized size = 1.95 \begin {gather*} \frac {\sec (c) \sec ^2(c+d x) (2 d x \cos (3 c+2 d x)+2 \cos (c+2 d x) (d x+i \log (\cos (c+d x)))+\cos (c) (i+4 d x+4 i \log (\cos (c+d x)))+2 i \cos (3 c+2 d x) \log (\cos (c+d x))+3 \sin (c)-3 \sin (c+2 d x))}{2 a^3 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^6/(a + I*a*Tan[c + d*x])^3,x]

[Out]

(Sec[c]*Sec[c + d*x]^2*(2*d*x*Cos[3*c + 2*d*x] + 2*Cos[c + 2*d*x]*(d*x + I*Log[Cos[c + d*x]]) + Cos[c]*(I + 4*
d*x + (4*I)*Log[Cos[c + d*x]]) + (2*I)*Cos[3*c + 2*d*x]*Log[Cos[c + d*x]] + 3*Sin[c] - 3*Sin[c + 2*d*x]))/(2*a
^3*d)

________________________________________________________________________________________

Maple [A]
time = 0.30, size = 41, normalized size = 0.71

method result size
derivativedivides \(\frac {-3 \tan \left (d x +c \right )+\frac {i \left (\tan ^{2}\left (d x +c \right )\right )}{2}-4 i \ln \left (\tan \left (d x +c \right )-i\right )}{d \,a^{3}}\) \(41\)
default \(\frac {-3 \tan \left (d x +c \right )+\frac {i \left (\tan ^{2}\left (d x +c \right )\right )}{2}-4 i \ln \left (\tan \left (d x +c \right )-i\right )}{d \,a^{3}}\) \(41\)
risch \(\frac {8 x}{a^{3}}+\frac {8 c}{a^{3} d}-\frac {2 i \left (2 \,{\mathrm e}^{2 i \left (d x +c \right )}+3\right )}{d \,a^{3} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}+\frac {4 i \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{a^{3} d}\) \(73\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^6/(a+I*a*tan(d*x+c))^3,x,method=_RETURNVERBOSE)

[Out]

1/d/a^3*(-3*tan(d*x+c)+1/2*I*tan(d*x+c)^2-4*I*ln(tan(d*x+c)-I))

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 45, normalized size = 0.78 \begin {gather*} \frac {\frac {i \, \tan \left (d x + c\right )^{2} - 6 \, \tan \left (d x + c\right )}{a^{3}} - \frac {8 i \, \log \left (i \, \tan \left (d x + c\right ) + 1\right )}{a^{3}}}{2 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^6/(a+I*a*tan(d*x+c))^3,x, algorithm="maxima")

[Out]

1/2*((I*tan(d*x + c)^2 - 6*tan(d*x + c))/a^3 - 8*I*log(I*tan(d*x + c) + 1)/a^3)/d

________________________________________________________________________________________

Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 113 vs. \(2 (52) = 104\).
time = 0.37, size = 113, normalized size = 1.95 \begin {gather*} \frac {2 \, {\left (4 \, d x e^{\left (4 i \, d x + 4 i \, c\right )} + 4 \, d x + 2 \, {\left (4 \, d x - i\right )} e^{\left (2 i \, d x + 2 i \, c\right )} - 2 \, {\left (-i \, e^{\left (4 i \, d x + 4 i \, c\right )} - 2 i \, e^{\left (2 i \, d x + 2 i \, c\right )} - i\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - 3 i\right )}}{a^{3} d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, a^{3} d e^{\left (2 i \, d x + 2 i \, c\right )} + a^{3} d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^6/(a+I*a*tan(d*x+c))^3,x, algorithm="fricas")

[Out]

2*(4*d*x*e^(4*I*d*x + 4*I*c) + 4*d*x + 2*(4*d*x - I)*e^(2*I*d*x + 2*I*c) - 2*(-I*e^(4*I*d*x + 4*I*c) - 2*I*e^(
2*I*d*x + 2*I*c) - I)*log(e^(2*I*d*x + 2*I*c) + 1) - 3*I)/(a^3*d*e^(4*I*d*x + 4*I*c) + 2*a^3*d*e^(2*I*d*x + 2*
I*c) + a^3*d)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {i \int \frac {\sec ^{6}{\left (c + d x \right )}}{\tan ^{3}{\left (c + d x \right )} - 3 i \tan ^{2}{\left (c + d x \right )} - 3 \tan {\left (c + d x \right )} + i}\, dx}{a^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**6/(a+I*a*tan(d*x+c))**3,x)

[Out]

I*Integral(sec(c + d*x)**6/(tan(c + d*x)**3 - 3*I*tan(c + d*x)**2 - 3*tan(c + d*x) + I), x)/a**3

________________________________________________________________________________________

Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 128 vs. \(2 (52) = 104\).
time = 0.87, size = 128, normalized size = 2.21 \begin {gather*} \frac {2 \, {\left (\frac {2 i \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}{a^{3}} - \frac {4 i \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - i\right )}{a^{3}} + \frac {2 i \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}{a^{3}} + \frac {-3 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 3 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 7 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 3 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 3 i}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{2} a^{3}}\right )}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^6/(a+I*a*tan(d*x+c))^3,x, algorithm="giac")

[Out]

2*(2*I*log(tan(1/2*d*x + 1/2*c) + 1)/a^3 - 4*I*log(tan(1/2*d*x + 1/2*c) - I)/a^3 + 2*I*log(tan(1/2*d*x + 1/2*c
) - 1)/a^3 + (-3*I*tan(1/2*d*x + 1/2*c)^4 + 3*tan(1/2*d*x + 1/2*c)^3 + 7*I*tan(1/2*d*x + 1/2*c)^2 - 3*tan(1/2*
d*x + 1/2*c) - 3*I)/((tan(1/2*d*x + 1/2*c)^2 - 1)^2*a^3))/d

________________________________________________________________________________________

Mupad [B]
time = 3.37, size = 41, normalized size = 0.71 \begin {gather*} -\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )\,8{}\mathrm {i}+6\,\mathrm {tan}\left (c+d\,x\right )-{\mathrm {tan}\left (c+d\,x\right )}^2\,1{}\mathrm {i}}{2\,a^3\,d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(c + d*x)^6*(a + a*tan(c + d*x)*1i)^3),x)

[Out]

-(log(tan(c + d*x) - 1i)*8i + 6*tan(c + d*x) - tan(c + d*x)^2*1i)/(2*a^3*d)

________________________________________________________________________________________